<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>评论列表</title>
  <link rel="stylesheet" href="./libs/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/reset.css">
  <link rel="stylesheet" href="css/iconfont.css">
  <link rel="stylesheet" href="css/main.css">
  <script src="./libs/jquery-1.12.4.min.js"></script>
  <script src="./libs/template-web.js"></script>

  <script src="./js/https.js"></script>
  <script src="./js/comment_list.js"></script>
  <script src="./libs/bootstrappaginator/bootstrap-paginator.min.js"></script>

  <script id='comment_list' type="text/html">
    {{each data}}
    <tr class="{{$value.state == '待审核'?'danger':''}}">
      <td>{{$value.author}}</td>
      <td>{{$value.content}}</td>
      <td>{{$value.title}}</td>
      <td>{{$value.date}} {{$value.time}}</td>
      <td>{{$value.state}}</td>
      <td class="text-center">
        {{if $value.state == '已通过'}}
        <a href="javascript:void(0);;" class="btn btn-warning btn-xs">拒绝</a>
        {{/if}}
        {{if $value.state == '已拒绝'}}
        <a href="javascript:void(0);;" class="btn btn-danger btn-xs">删除</a>
        {{/if}}
        {{if $value.state == '待审核'}}
        <a href="javascript:void(0);;" class="btn btn-info btn-xs">批准</a>
        <a href="javascript:void(0);;" class="btn btn-danger btn-xs">删除</a>
        {{/if}}
      </td>
    </tr>
    {{/each}}
  </script>
</head>

<body>
  <div class="container-fluid">
    <div class="common_title">
      评论列表
    </div>
    <div class="container-fluid common_con">
      <table class="table table-striped table-bordered table-hover mp20">
        <thead>
          <tr>
            <th>作者</th>
            <th>评论</th>
            <th>评论在</th>
            <th>提交于</th>
            <th>状态</th>
            <th class="text-center" width="100">操作</th>
          </tr>
        </thead>
        <tbody id="comment-list">

          <!-- <tr class="danger">
            <td>小右</td>
            <td>你好啊，交个朋友好吗？</td>
            <td>《世界，你好》</td>
            <td>2017-07-06 14:10:00</td>
            <td>待审核</td>
            <td class="text-center">
              <a href="javascript:void(0);;" class="btn btn-info btn-xs">批准</a>
              <a href="javascript:void(0);;" class="btn btn-danger btn-xs">删除</a>
            </td>
          </tr> -->
        </tbody>
      </table>
      <div class="row text-center">
        <ul class="pagination pagination-sm">
          <!-- <li class="page-item first disabled"><a href="#" class="page-link">首页</a></li>
          <li class="page-item prev disabled"><a href="#" class="page-link">上一页</a></li>
          <li class="page-item active"><a href="#" class="page-link">1</a></li>
          <li class="page-item"><a href="#" class="page-link">2</a></li>
          <li class="page-item"><a href="#" class="page-link">3</a></li>
          <li class="page-item"><a href="#" class="page-link">4</a></li>
          <li class="page-item"><a href="#" class="page-link">5</a></li>
          <li class="page-item"><a href="#" class="page-link">6</a></li>
          <li class="page-item"><a href="#" class="page-link">7</a></li>
          <li class="page-item next"><a href="#" class="page-link">下一页</a></li>
          <li class="page-item last"><a href="#" class="page-link">尾页</a></li> -->
        </ul>
        <ul id="pagination" class="pagination-sm"></ul>
      </div>

    </div>
  </div>
</body>

</html>